import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import Login from './components/login';
import RouterConfig from './router.config';

RouterConfig.init()
	.then(routes => {
		ReactDOM.render(<App routes={routes} source={RouterConfig.source} />, document.getElementById('backendApp'));
	})
	.catch(() => {
		ReactDOM.render(<Login />, document.getElementById('backendApp'));
	});
